package com.CmJava.controller;

import com.CmJava.annotation.Autowired;
import com.CmJava.annotation.Component;
import com.CmJava.service.MyService;
import com.CmJava.service.MyServiceImpl;
import com.CmJava.service.MyServiceLazyImpl;

@Component
public class MyController {

    //这里并没有考虑代理对象的注入
    @Autowired
    private MyServiceLazyImpl myServiceLazy;

    @Override
    public String toString() {
        return "MyController{" +
                "myService=" + myServiceLazy +
                '}';
    }

    public MyService getMyService() {
        return myServiceLazy;
    }
}
